1. Field
The present embodiments are generally related to multi-version concurrency control and garbage collection of versions of records in an in-memory database system.
2. Background
Conventional database management systems have been optimized to perform on hardware with limited main memory, e.g. random access memory (RAM). These conventional database management systems have slower disk input/output (I/O) that serves as a bottleneck.
However, computer architecture has advanced so that that multi-core parallel processing is possible by processor cores communicating using RAM or a shared cache. In addition, RAM is no longer as limited a resource. Databases may now be stored entirely in RAM and thus disk access is no longer a limiting factor for performance. However, multi-core systems present other challenges.
Databases of online transaction processing systems have been modified to utilize multi-core parallel processor computer systems efficiently. In particular, these databases support parallel execution of transactions, are now located in-memory and are organized to be cache efficient. Although RAM has become voluminous, in multi-core parallel processing in-memory database systems, communication between processor cores requires storage of many versions of records and copies of a database. Each database update operation generates a new record version instead of overwriting an existing record that is already stored. The database system will eventually not have enough storage for each record version and execute garbage collection to “throw away” or consolidate not-to-be-used-anymore record versions. However, conventional multi-core parallel processing garbage collection protocols may be improved to reduce memory usage.